import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const iotview: AppRouteModule = {
  path: '/iotview',
  name: 'IotView',
  component: LAYOUT,
  redirect: '/dashboard/analysis',
  meta: {
    orderNo: 10,
    icon: 'ant-design:area-chart',
    title: t('routes.iotview.title'),
  },
  children: [
    {
      path: 'realmap',
      name: 'RealMap',
      component: () => import('/@/views/dashboard/analysis/index.vue'),
      meta: {
        // affix: true,
        title: t('routes.iotview.realMap'),
      },
    },
    {
      path: 'realtime',
      name: 'RealTime',
      component: () => import('/@/views/dashboard/analysis/index.vue'),
      meta: {
        // affix: true,
        title: t('routes.iotview.realTime'),
      },
    },
    {
      path: 'activealarm',
      name: 'ActiveAlarm',
      component: () => import('/@/views/dashboard/workbench/index.vue'),
      meta: {
        title: t('routes.iotview.activeAlarm'),
      },
    },
    {
      path: 'histroy',
      name: 'histroy',
      component: () => import('/@/views/dashboard/workbench/index.vue'),
      meta: {
        title: t('routes.iotview.history'),
      },
    },
    {
      path: 'histroyalarm',
      name: 'HistroyAlarm',
      component: () => import('/@/views/dashboard/workbench/index.vue'),
      meta: {
        title: t('routes.iotview.histroyAlarm'),
      },
    },
  ],
};

export default iotview;
